package com.ruyuan.payment.pay.controller.admin;

import com.ruyuan.payment.server.req.BillHandleQueryReq;
import com.ruyuan.payment.server.resp.BillHandleQueryResp;
import com.ruyuan.payment.server.resp.CommonResp;
import com.ruyuan.payment.server.resp.PageResp;
import com.ruyuan.payment.server.service.BillHandleService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;

@RestController
@RequestMapping("/admin/bill-handle")
public class AdminBillHandleController {

    private static final Logger LOG = LoggerFactory.getLogger(AdminBillHandleController.class);

    @Resource
    private BillHandleService billHandleService;

    @GetMapping("/query-list")
    public CommonResp queryList(@Valid BillHandleQueryReq req) {
        CommonResp<PageResp<BillHandleQueryResp>> commonResp = new CommonResp<>();
        PageResp<BillHandleQueryResp> billHandleQueryRespList = billHandleService.queryList(req);
        commonResp.setContent(billHandleQueryRespList);
        return commonResp;
    }

}
